Class ObstaclesDetection

Class Documentation

class ObstaclesDetection

Public Functions

ObstaclesDetection()

Constructor.

~ObstaclesDetection()

Destructor.

void Initiate(int disparity_size, double baseline, double u0, double v0, double focal, int Width, int Height, int scale, int min_disparity, bool enNeg, const std::string &Parameter_filename)

This function initiates parameters required to run ObstaclesDetection class.

Parameters
  • disparity_size – Maximum disparity value.

  • baseline – Baseline of the stereo rig.

  • u0 – Camera center in x-direction in the rectified image coordinates

  • v0 – Camera center in y-direction in the rectified image coordinates

  • focal – Focal length of the rectified stereo rig

  • Width – Width of the rectified image

  • Height – Height of the rectified image

  • scale – Value to scale down the calibration parameters and image size

  • min_disparity – Minimum disparity value to consider. All disparities less than this is dis-regarded.

  • enNeg – Flag to indicate whether to enable negative obstacle detection

  • Parameter_filename – Path to the file that contain parameters for superpixel segmentation.

void ExecuteDetection(cv::Mat &disparity_map, cv::Mat &img)

This is the main function that run obstacle detection, road detection and slope detection.

Parameters
  • disparity_map – Disparity image of the rectified left camera view

  • img – Rectified left camera view

Public Members

cv::Mat obsDisFiltered

Disparity image of all obstacles of the scene.

cv::Mat slope_map

Image to visualize slope detection results.

cv::Mat left_rect_clr

Colour rectified left image, used to visualize obstacle detection results.

double slope_angle = 0.0

Deprecated. Slope angle for the first road segment in degrees.

double pitch_angle = 0.0

Pitch for the road segment in degrees.